package com.speily.cloud.account.service;

import com.speily.cloud.account.dao.entity.Account;
import com.speily.cloud.account.dao.mapper.AccountMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * AccountServiceImpl
 *
 * @author : SPL
 * @since : 2021-04-20 11:41
 **/
@DubboService
@Slf4j
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public String decreaseAccount(String userId) {
        Account account = new Account();
        account.setId(1);
        account.setUserId("111");
        account.setMoney(56d);
        accountMapper.updateById(account);
        return "扣除余额" + 111;
    }
}
